﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;

namespace Chbl.Models
{
    public class TeamPlayer
    {
        public int TeamPlayerId { get; set; }
        [Required(ErrorMessage = "Выберите команду")]
        public int TeamId { get; set; }
        [Required(ErrorMessage = "Выберите игрока")]
        public int PlayerId { get; set; }
        public virtual  Team Team { get; set; }
        public virtual  Player Player { get; set; }
        [Required(ErrorMessage = "Введите дату вхождения в состав команды")]
        public DateTime BeginDate { get; set; }
        public DateTime? EndDate { get; set; }
    }
}